package main

func main() {
	//println("hello world")
	//info()
	//defineVar()
	defineEnum()
}

func info() {
	var aa int32 = 2
	println(aa)
}

// 定义变量和常量
func defineVar() {
	c := "john.huang"
	d := 2
	const name = "HELLO CONST"
	println(name, d, c)
}

// 定义枚举
func defineEnum() {
	//const (
	//	apple = iota
	//	banana
	//	cherry
	//	grape
	//)
	//println(apple, banana, cherry, grape)

	// 1_1.iota独立自增
	const (
		apple  = iota + 1
		banana = iota + 2
		cherry
		grape
	)
	println(apple, banana, cherry, grape)
}
